			#Copyright 2018 Sarah Scarlett
			#This file is part of Oui Wee.
			#Oui Wee is free software: you can redistribute it and/or modify
			#it under the terms of the GNU General Public License as published by
			#the Free Software Foundation, either version 3 of the License, or
			#(at your option) any later version.

			#Oui Wee is distributed in the hope that it will be useful,
			#but WITHOUT ANY WARRANTY; without even the implied warranty of
			#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
			#GNU General Public License for more details.

			#You should have received a copy of the GNU General Public License
			#along with Oui Wee. If not, see <http://www.gnu.org/licenses/>.


from kivy.app import App
from kivy.uix.button import Button
from kivy.core.audio import SoundLoader
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.image import Image
from kivy.core.window import Window

import webbrowser

__version__ = "2.2.0" #because it makes kivy happy

class Oui_Wee(App):
	Window.clearcolor = (.77,.93,.94, 1)
		
	icon = 'tiles.gif'
	
	sherpie = Image(source = 'titlewee.gif')
	global sharpie
	sharpie = sherpie

	def build(self):
		sharpie
		self.stoppy=Button(text='Stop',font_size=22,  color=(0.92, 0.30, 0.30,1),background_normal='',background_color =(1, 0.97, 0.76, 1))
		self.stoppy.bind(on_press=self.getMessagestoppy)
		self.thanks = Button(text='Thank you for using your software Freedoms :)', font_size=11, color=(0.02, 0.18, 0.58,1), background_color = (0,0,0,0))
		self.thanks.bind(on_press = self.kittenasacat)
		self.flush = Button(text='Flush',font_size=22, color=(0.02, 0.18, 0.58,1),background_normal='',background_color =(1, 0.97, 0.76, 1))
		self.flush.bind(on_press=self.getMessageFlush)
		self.piss = Button(text='Power Piss',font_size=22, color=(0.02, 0.18, 0.58,1),background_normal='', background_color =(1, 0.97, 0.76, 1))# 222 contractor protec/escort mon - thurs 20:00 -06:00
		self.piss.bind(on_press=self.getMessagepiss)
		self.tinkle = Button(text='Little Tinkle',font_size=22, color=(0.02, 0.18, 0.58,1),background_normal='',background_color =(1, 0.97, 0.76, 1))
		self.tinkle.bind(on_press=self.getMessagetinkle)
		layout = BoxLayout(orientation ='vertical',padding=(2,2,2,2), background_color = (.77,.93,.94), spacing = 30)
		layout.add_widget(sharpie)		
		layout.add_widget(self.tinkle)
		layout.add_widget(self.piss)
		layout.add_widget(self.flush)
		layout.add_widget(self.stoppy)
		layout.add_widget(self.thanks)
		return layout


	def kittenasacat(self, *args):
		kc = gogogokittenasacat()
		kc.getMessage(self)

	def getMessageFlush(self, *args):
		global sf
		sf = gogogoflush()
		sf.getMessage(self)

	def getMessagepiss(self, *args):
		global sp
		sp = gogogopiss()
		sp.getMessage(self)
		
	def getMessagetinkle(self, *args):
		global st
		st = gogogotinkle()
		st.getMessage(self)
		
	def getMessagestoppy(self, *args):
		ss = gogogostoppy()
		ss.getMessage(self)

	def getMessagethanks(self, *args):
		th = gogogothanks()
		th.getMessage(self)


class gogogokittenasacat:
 
	def getMessage(self, source):
		global mostanything
		mostanything = webbrowser.open('http://www.gnu.org/philosophy/philosophy.html')

class gogogopiss:

	def getMessage(self, source):
		
		caterpillar = source.piss
		global caterpillar
		caterpillar = SoundLoader.load('PowerPiss.ogg')
		boysdontcry = caterpillar.play()

class gogogoflush:

	def getMessage(self, source):
		
		caterpillar = source.flush
		global caterpillar
		caterpillar = SoundLoader.load('flush.ogg')
		picturesofyou = caterpillar.play()


class gogogotinkle:
	
	def getMessage(self, source):
		
		caterpillar = source.tinkle
		global caterpillar
		caterpillar = SoundLoader.load('tinkle.ogg')
		fridayiminlove = caterpillar.play()
		
	
class gogogostoppy:

	def getMessage(self, source):

		if caterpillar.state == 'play':
			caterpillar.stop()

		


if __name__ == "__main__":
	Oui_Wee().run()